package cn.edu.scau.cmi.ZengLinghong.chapter10;

import java.util.*;

public class Fenxi {

	public static double getTotalScore(String s) {
		Scanner in = new Scanner(s);
		in.useDelimiter("[^0123456789]+");
		double totalScore = 0;
		while (in.hasNext()) {
			try {
				double score = in.nextDouble();
				totalScore = totalScore + score;
			} catch (InputMismatchException e) {
				String t = in.next();
			}
		}
		return totalScore;
	}

}
